import request from '@/utils/request'

export default {
  // 医院设置列表
  getHospSetList(current, limit, searchObj) {
    return request({
      url: `/admin/hosp/hosptialSet/findPage/${current}/${limit}`,
      method: 'post',
      // 使用json
      data: searchObj
    })
  },
  // 删除医院设置
  deleteHospSet(id) {
    return request({
      url: `/admin/hosp/hosptialSet/${id}`,
      method: 'delete'
    })
  },
  // 批量删除医院设置
  batchHospSet(idList) {
    return request({
      url: `/admin/hosp/hosptialSet/batchRemove`,
      method: 'delete',
      data: idList
    })
  },
  // 状态锁定和取消锁定
  lockHospSet(id, status) {
    return request({
      url: `/admin/hosp/hosptialSet/lockHospitalSet/${id}/${status}`,
      method: 'put'
    })
  },
  // 添加医院设置
  saveHospSet(hosptialSet) {
    return request({
      url: `/admin/hosp/hosptialSet/saveHospitalSet`,
      method: 'post',
      data: hosptialSet
    })
  },
  // 根据id查询医院设置
  getHospSet(id) {
    return request({
      url: `/admin/hosp/hosptialSet/getHospitalSet/${id}`,
      method: 'get'
    })
  },
  // 修改医院设置
  updatetHospSet(hospitalSet) {
    return request({
      url: `/admin/hosp/hosptialSet/updateHospitalSet`,
      method: 'post',
      data: hospitalSet
    })
  }
}
